package com.dobbinsoft.iotechn.device.enums;

/**
 * @author : rize
 * @description : 设备日志等级
 * @time : 2020/6/17
 */
public enum DeviceLevelType {

    EASY(1, "简易"),
    SAFE(2,"安全"),
    ;

    DeviceLevelType(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private int code;

    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static boolean contains(int code) {
        for (DeviceLevelType type : values()) {
            if (type.getCode() == code) {
                return true;
            }
        }
        return false;
    }

}
